<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
  <head>
    <title></title>
    <meta charset="UTF-8">
    <script src="../../../platform.js" shadow="polyfill"></script>
  </head>
  <body>
    <x-foo>plain</x-foo>
    <button is="x-baz">plain</button>
    <template bind="{{}}">
      Hello from {{source}}
    </template>
    <script>
      document.addEventListener('WebComponentsReady', function() {
        document.querySelector('template').model = {
          source: "MDV"
        };
        //
        var p = Object.create(HTMLElement.prototype);
        p.readyCallback = function() {
          this.textContent = 'custom!';
        }
        document.register('x-foo', {prototype: p});
        //
        var p = Object.create(HTMLButtonElement.prototype);
        p.readyCallback = function() {
          this.textContent = 'custom!';
        }
        document.register('x-baz', {prototype: p, extends: 'button'});
        document.body.appendChild(
          document.createElement('x-baz'));
      });
    </script>
  </body>
</html>
